#ifndef __ECDSA_H__
#define	__ECDSA_H__
#include "CString.h"
#include <openssl/ec.h>
#include <openssl/obj_mac.h>
#include <openssl/ecdsa.h>
#include <openssl/pem.h>
#include <openssl/bn.h>
#include <qstring.h>
#include <qdebug.h>
#include <openssl/evp.h>
#include <openssl/err.h>

#define			ECC_KEY_ERR			1
#define			ECC_SIGN_ERR		2
typedef struct {
    QString prikey;
    QString pubkey;
}ECC_KEY_STRING;

class ECDSA
{
public:
    bool GENERATE_ECC_KEY(int nid, ECC_KEY_STRING &key);
    bool GENERATE_ECC_KEY_B(int nid, ECC_KEY_STRING& key);
    bool GENERATE_ECC_KEY_EVP(int nid, ECC_KEY_STRING& key);
    QString ECC_SIGN(int nid, const ECC_KEY_STRING key, const QString E, uint8_t *err_log);
    bool ECC_VERIFY(int nid, const ECC_KEY_STRING key, const QString E, const QString Sign);
private:

};

#endif // !__ECC_H__



